-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump monty
to use the monty.json
import speedup patch, add import time regression test, lazy load some rarely used but costly modules
#4128
bump monty
to use the monty.json
import speedup patch, add import time regression test, lazy load some rarely used but costly modules
#4128
Conversation
monty
to use the latest json import speedup patchmonty
to use the latest monty.json
import speedup patch
368bc69
to
1eb855b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
5489dff
to
8d9d9a6
Compare
8d9d9a6
to
f8b5723
Compare
ee3c9d4
to
1948442
Compare
@mkhorton Can I lazy import |
@@ -664,6 +662,10 @@ def plot_slab( | |||
decay (float): how the alpha-value decays along the z-axis | |||
inverse (bool): invert z axis to plot opposite surface | |||
""" | |||
# Expensive import (PR4128) | |||
from matplotlib import patches |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
monty
to use the latest monty.json
import speedup patchmonty
to use the latest monty.json
import speedup patch, add import test regression test, lazy load some rarely used but costly modules
1115ef3
to
2f7f993
Compare
4e21061
to
abf5f8b
Compare
8ca9cc7
to
8f5c2ac
Compare
thanks a lot for your extensive profiling work @DanielYang59! i expected there would be a some low-hanging fruit but not nearly as much as you found. you went above and beyond here. 👍 |
monty
to use the latest monty.json
import speedup patch, add import test regression test, lazy load some rarely used but costly modulesmonty
to use the monty.json
import speedup patch, add import time regression test, lazy load some rarely used but costly modules
thanks @shyuep this hopefully would significantly speedup import |
Summary
pyproject.toml
to avoid duplicatesympy >= 1.3
to resolve bumpnetworkx
to 2.7 to fix intermittent CI failure whentorch
install failed:ImportError: cannot import name 'Mapping' from 'collections'
#4116 (comment)from numpy.testing import assert_allclose
in production codebump
monty
to use the latest json import speedup patch, partially fix importmonty.json
slowing down core import #3793Have a quick look at other important modules (on cover those import other 3rd-party/non-core-pmg modules in this PR) and add import time test (profile:
python -X importtime -c "from pymatgen.core.structure import Structure" 2> pmg.log && tuna pmg.log
):AseAtomsAdaptor
lazy imported)[For a follow up PR] looks like
scipy
acrosscore
need special attention